package com.info.provider;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;

/**
 * Created by pengshuo on 2018/1/6 17:21
 * Description:
 * Modified By:
 * Version:
 *
 * @author pengshuo
 */
// 注册eureka
@EnableDiscoveryClient
// spring boot
@SpringBootApplication
// 开启事物
@EnableTransactionManagement
public class Application {

    @Bean
    public RestTemplate restTemplate(){
        return  new RestTemplate();
    }

    public static void main(String[] args) {
        new SpringApplicationBuilder(Application.class).web(true).run(args);
    }
}
